package com.xkh.common.controller;


import cn.hutool.core.thread.ThreadUtil;
import com.xkh.common.controller.factory.AsyncFactory;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author xkh
 * @date 2020/11/3 14:55
 */
@RestController
@RequestMapping("util/async")
@Api(tags = "异步任务模块")
public class AsyncController {


    @GetMapping("/open")
    @ApiOperation("开始异步任务")
    public void open(){
        ThreadUtil.execAsync(AsyncFactory.task());
    }
}
